<?php
	if(!isset($_REQUEST['ajax'])){ $_REQUEST['ajax'] = "";}
	if($_REQUEST['ajax']!=true) include 'header.tpl.php';
?>
	<div class="row">
		<div class="col-lg-12">
			<ul class="shortcut-buttons-set">
				<li>
					<a class="shortcut-button" href='#request_list'><span>
					<img src="resources/images/icons/panel/project_process.png" alt="icon" width="48px" height="48px" /><br />
					<?php echo $this->language['list'];?></span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#request_list/status=0'><span>
					<img src="resources/images/icons/panel/project_wait.png" alt="icon" width="48px" height="48px" /><br />
					<?php echo $this->language['waiting'];?></span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#request_create' ><span>
					<img src="resources/images/icons/panel/project_new.png" alt="icon" width="48px" height="48px" /><br />
					<?php echo $this->language['request_create'];?></span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#cost_list'><span>
					<i class="icon-share"></i><br />
					Chi phí</span></a>
				</li>
				<li>
					<a class="shortcut-button" href='#request_list/type=CKLED'><span>
					<i class="icon-share"></i><br />
					Chiết khấu LED</span></a>
				</li>
				<?php if(check_permission('request_view')): ?>
				<li>
					<a class="shortcut-button" href='#request_report'><span>
					<i class="icon-file-text-alt"></i><br />
					Xem báo cáo</span></a>
				</li>
				<?php endif;?>
			</ul>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title"><i class="icon-file-text-alt"></i> <?php echo $this->language['list'];?></div>
				</div>
				<div class="panel-body">
					<table class="table table-fixed table-hover table-condensed">
						<thead>
							<tr>
								<th width='120px'>Người tạo</th>
								<th>Lý do</th>
								<th width='85px'>Số tiền</th>
								<th width='80px'>Ngày tạo</th>
								<th width='50px'>&nbsp;</th>
							</tr>
						</thead>
						<tbody>
							<?php foreach($this->costs as $row){ ?>
							<tr>
								<td><a href="#user_view/uId=<?php echo $row['uId'];?>"><?php echo $row['uFullname'];?></a></td>
								<td><a href='#cost_view/id=<?php echo $row['cost_id'];?>'><?php echo $row['cost_reason'];?></a></td>
								<td><font color=red><?php echo number_format($row['cost_total'],0,'',',');?></font></td>
								<td><?php echo date("d/m/Y",$row['cost_create_date']);?></td>
								<td>&nbsp;</td>
							</tr>
							<?php } ?>
						</tbody>
						<?php if(isset($this->tfoot)) echo $this->tfoot;?>
					</table>
				</div>
			</div>
		</div>
	</div>
<?php if(isset($this->breadcrumb) && isset($this->title_header)):?>
	<script type="text/javascript">
		$(function() {
			$("#title-header").text('<?php echo $this->title_header;?>');
			$("#breadcrumb").html('<?php echo build_breadcrumb($this->breadcrumb);?>');
		});
	</script>
<?php endif;?>
<?php
	if($_REQUEST['ajax']!=true) include 'footer.tpl.php';
?>